const router = require("express").Router();
const Auth = require("../../../middleware/auth");
const { Validate, banner } = require("../../../validate");
const BannerController = require("../../../controllers/banner");

router.get("/list", BannerController.list);

// 管理员专属
router.get("/getall", Auth.session, BannerController.getAll);
router.post(
    "/create",
    Auth.session,
    Validate(banner.create),
    BannerController.create
);

module.exports = router;
